<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="../connections/connect.asp" -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<%
		var cusID =Request.Form("cusID")
		var pass = Request.Form("pass")
		var fullName = Request.Form("fullName")	
		var gende = Request.Form("gender")				
		var phone = Request.Form("phone")
		var email = Request.Form("email")
		var add = Request.Form("add")
		var quesID = Request.Form("quesID")
		var aswer = Request.Form("asw")
		var gender = parseInt(gende)
		
		var sql1 = "Select*From Customer WHERE CustomerID = '"+cusID+"'"
		var test = conn.Execute(sql1);
		if(!test.EOF){
			Response.Write("Customer is existed !") 					
		%>
        <a href="../register.asp">Try again!</a>
        
		<%  
		
		}
		
		else		
		
		{
		var sql = "Insert INTO Customer (CustomerID,Password,FullName,Gender,Phone,Email,Address,QuestionID,Answer) VALUES('"+cusID+"','"+pass+"','"+fullName+"','"+gender+"','"+phone+"','"+email+"','"+add+"','"+quesID+"','"+aswer+"')"
			var list=conn.Execute(sql)		
			Response.Redirect("../login.asp")
		}	
		
	%>
</body>
</html>
